﻿@model Manager.Model.Admin.M_Stylist

@{
    ViewBag.Title = "名师推荐设置";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}
@section header{
<script type="text/javascript" src="@Url.Content("~/ueditor/editor_config.js")"></script>
<script type="text/javascript" src="@Url.Content("~/ueditor/editor_all.js")"></script>
<link rel="stylesheet" href="@Url.Content("~/ueditor/themes/default/ueditor.css")" />
}
<div class="nav">当前位置 :-> 名师推荐 :-> 编辑名师</div>

@using (Html.BeginForm("Edit", "Stylist", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>名师推荐信息</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.StylistID)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.StylistID, new { @disabled = "disabled" })
            @Html.ValidationMessageFor(model => model.StylistID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StylistName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.StylistName)
            @Html.ValidationMessageFor(model => model.StylistName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StylistDesc)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.StylistDesc)
            @Html.ValidationMessageFor(model => model.StylistDesc)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StylistTel)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.StylistTel)
            @Html.ValidationMessageFor(model => model.StylistTel)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StylistShopID)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.StylistShopID, ViewBag.ShopSelect as IEnumerable<SelectListItem>)
            @Html.ValidationMessageFor(model => model.StylistShopID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StylistImage)
        </div>
        <div class="editor-field">
            <input type="file" style="width:200px" name="StylistImage" />
            @Html.ValidationMessageFor(model => model.StylistImage)
            @if (Model.StylistImage != null)
            {
            <a target="_blank" href="@Url.Content("~" + Model.StylistImage)">点击查看</a>
            }
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StylistTypeID)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.StylistTypeID, ViewBag.CategorySelect as IEnumerable<SelectListItem>)
            @Html.ValidationMessageFor(model => model.StylistTypeID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsTop)
        </div>
        <div class="editor-field">
            @Html.RadioButtonFor(model => model.IsTop,true, new { @id="isTop1"})是
            @Html.RadioButtonFor(model => model.IsTop,false, new { @id = "isTop2" })否
            @Html.ValidationMessageFor(model => model.IsTop)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.IsValid)
        </div>
        <div class="editor-field">
            @Html.RadioButtonFor(model => model.IsValid, true, new { @id = "IsValid1"})是
            @Html.RadioButtonFor(model => model.IsValid, false, new { @id = "IsValid2"})否
            @Html.ValidationMessageFor(model => model.IsValid)
        </div>

        <p>
            <input type="submit" value="保存" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("返回", "Index")
</div>
<script type="text/javascript">
    var editor = new baidu.editor.ui.Editor();
    editor.render("StylistDesc");
</script>

